from os.path import join

def letters():
    global newstr
    newstr = ''
    for char in str:
        if char.isalpha():
            newstr += char
    print("剔除非英文字母后：" + newstr)


def reverse():
    l = list(newstr)
    l.reverse()
    nstr = ''.join(l)
    print("反转后:" + nstr)


str = input("请输入一串字符串：")
letters()
reverse()
